import React from "react"
import ReactDOM from "react-dom"
import { BrowserRouter as Router, Route, Switch } from 'react-router-dom';
import "@/app.scss"

import App from "@/App.js"
import Detail from '@/Detail.js'
import Feilei from '@/feilei.js'
import Girl from '@/girl.js'
import Boy from '@/boy.js'
import Paihang  from '@/paihang.js'
import Shudan from '@/shudan.js'
import Bookstore from '@/bookstore.js'

import Xianyan from '@/feileixianyan.js'
import Search from '@/search.js'
import Register from '@/register.js'
import Longin from '@/login.js'
//箭头函数的简写形式



ReactDOM.render(
                <Router>
                    <Switch>
                        <Route path='/detail/:id/:author' component={Detail}/>
                        <Route path='/feilei' component={Feilei}/>
                        <Route path='/girl' component={Girl}/>
                        <Route path='/boy' component={Boy}/>
                        <Route path='/paihang' component={Paihang}/>
                        <Route path='/shudan' component={Shudan}/>
                        <Route path='/bookstore' component={Bookstore}/>
                        <Route path='/xianyan' component={Xianyan}/>
                        <Route path='/search' component={Search}/>
                        <Route path='/register' component={Register}/>
                        <Route path='/login' component={Longin}/>

                        <Route path='/' component={App}/>

                    </Switch>
                </Router>,
// 渲染的时候以标签的形式
document.getElementById("root")
)

